A database, such as DB2 from IBM Corp., may utilize tables that depend from a tablespace. The tablespace contains all of the semi-permanent data of the database, and the tables contain user updates and modifications to that data. Users access the database data from the tablespace by creating a subset of that data in a table, and then modify and update the table data. The users periodically update the database to overwrite the data in the tablespace with the table data.
One problem that occurs when a user updates the data in a table is that the data updates may be incorrect, such as due to a loss of power during a table update, an error in a data input routine, or other common sources of error. In such situations, it is necessary to rebuild the data in the table without storing the table data to the tablespace, because the corrupted data must not be allowed to be transmitted to the tablespace. For example, it is common to keep a log record file of table updates, such that the tablespace data may be updated using the log record file.
One drawback with known methods of recovering tables is that they require that the tablespace be recovered with the log record files. When the tablespace is recovered, all access to the tablespace must be restricted, including access by unaffected tables. In addition, access to all tables must also be restricted until the tablespace is recovered. As a result, if two or more users are utilizing the tablespace to create two or more different tables, then all users are unable to access their tables while the data for a single table is recovered. This drawback may result in complete disruption of work while the tablespace is being recovered.
Based on the foregoing, there is a need for a system and method for recovering a table that substantially eliminate or reduce the problems associated with conventional systems and methods for recovering a table. In particular, a system and method for recovering a table are needed that allow multiple users to access unaffected tables, and that do not require the tablespace to be recovered.